#ifndef BOARD_H
#define BOARD_H


#include <QWidget>
#include <queue>
#include <vector>
#include <QTimer>
#include "object.h"
#include "cart.h"
#include "poultry.h"
#include <QMouseEvent>

using std::queue;
using std::vector;

class Board : public QWidget
{
    Q_OBJECT

public:
    explicit Board(QWidget *parent = 0);
    ~Board();

private:    
    int firstLine,secondLine,isPaused,catchedEggs,speed,timeLen,crashedEggs,catchedShits,chics,ducs,goos;
    short cartMoved,mousePressed;
    clock_t timeE;
    vector<Poultry*> *poutryList;
    queue<Object*> *toPaintList;
    queue<Product*> *eggList;
    queue<Product*> *shitList;
    Cart *cart;
    QTimer *timer;
    void paintEvent(QPaintEvent *pe);
    void keyPressEvent(QKeyEvent *event);
    void addChicken();
    void addDuck();
    void addGoose();
    void reset();    
    void mouseMoveEvent(QMouseEvent* even);
    void mousePressEvent(QMouseEvent* even);
    void mouseReleaseEvent(QMouseEvent* even);

signals:
public slots:
    void timeExecuted();
};

#endif // BOARD_H
